package cn.kgc.vue.task;

import cn.kgc.vue.mapper.LogInfoMapper;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author 课工场
 * @date 2024/7/12
 * @description 定时任务
 */
@Component
public class ScheduleTask {

    @Resource
    private LogInfoMapper logInfoMapper;
    // 定时删除日志    每月的最后一天
    @Scheduled(cron = "* * * L * ?  ")
    public void  deleteLogs(){
        logInfoMapper.deleteLogsInfo();
    }

}
